# User selects the device type
import cv2
from yolo_inference_framework import YOLOInferenceFramework
from config_manager import ConfigManager

def main():
    device_type = "BAIDU"  # or "HUAWEI"
    # Init config
    config_manager = ConfigManager()
    config = config_manager.get_full_config(device_type=device_type)
    
    # Init yolo framework
    yolo_framework = YOLOInferenceFramework(device_type)

    # Load the model
    model_path = config['model_path']
    yolo_framework.load_model(model_path)

    # Perform inference
    img_path = "path/to/image.jpg"  # Example input image path
    result = yolo_framework.infer_local_image(img_path)

    print("Inference Result:", result)


if __name__ == '__main__':
    main()